<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:corejsf="http://corejsf.com">
    <ui:composition template="/usertemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="View #{courseController.selected.courseName}"></h:outputText>
        </ui:define>
        <ui:define name="leftcontent">
            <h:form enctype="multipart/form-data">  
                <div class="pad_left1">
                    <h2 class="pad_bot1">#{courseController.selected.courseName}</h2>
                        <p class="pad_bot1 pad_top2"><strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</strong></p>
                        <p class="pad_bot1 pad_top2"><strong>Topic: #{courseController.selected.topicId.topicName}</strong></p>
                        <p class="pad_bot1 pad_top2"><strong>Assignment: <a href=" #{courseController.linkDownload(courseController.selected.assignmentFile)}">#{courseController.selected.assignmentFile}</a></strong></p>
                        <p class="pad_bot1 pad_top2"><strong>
                                Submit: &nbsp;
                                <p:fileUpload id="assignmentFile" value="#{studentCourseController.file}" mode="simple" allowTypes="/(\.|\/)(doc|docx|xls|xlsx)$/" required="true" requiredMessage="#{bundle.CreateCourseRequiredMessage_assignmentFile}" sizeLimit="100000" /> 
                        
                        </strong>
                        </p>
                                        #{courseController.selected.courseContent}
                </div>
                <br/>
                <ui:fragment rendered="#{studentCourseController.NoLogin() ==false}">
                    <h:commandLink action="#{studentCourseController.UpdateForUser()}" class="button marg_left1">
                        <span><span>
                        #{bundle.EditCourseSaveLink}
                        </span></span>
                    </h:commandLink>
                </ui:fragment>
                <ui:fragment rendered="#{studentCourseController.NoLogin() ==true}">
                    <i>You have to Login to submit Assignment</i>
                </ui:fragment>
            </h:form>
        </ui:define>
        <ui:define name="rightcontent">
            <h:form enctype="">
                <div class="pad_left1">
                    <h2>Important Dates</h2>
                </div>
                <div class="wrapper">
                        <span class="date">
                            <h:outputText value="#{courseController.selected.startDate}" title="#{bundle.ViewCourseTitle_startDate}">
                                    <f:convertDateTime pattern="dd" />
                            </h:outputText>
                        </span>
                        <p class="pad_top2">
                            <a href="#">
                            <h:outputText value="#{courseController.selected.startDate}" title="#{bundle.ViewCourseTitle_startDate}">
                                    <f:convertDateTime pattern="MM/yyyy" />
                            </h:outputText>
                            </a>
                            <br/>
                                        Start Date</p>
                </div>
                <div class="wrapper">
                        <span class="date">
                            <h:outputText value="#{courseController.selected.endDate}" title="#{bundle.ViewCourseTitle_startDate}">
                                    <f:convertDateTime pattern="dd" />
                            </h:outputText>
                        </span>
                        <p class="pad_top2">
                            <a href="#">
                                <h:outputText value="#{courseController.selected.endDate}" title="#{bundle.ViewCourseTitle_startDate}">
                                        <f:convertDateTime pattern="MM/yyyy" />
                                </h:outputText>
                            </a>
                            <br/>
                                        End Date</p>
                </div>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
